<%@page import="dao.TeacherDao"%>
<%@page import="entity.Teacher1"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h3 align="center">查询整张表</h3>
	
<table border="1" align="center">
	<tr>
		<td align="center">工号</td>
		<td align="center">姓名</td>
		<td align="center">身份证</td>
		<td align="center">院系</td>
		<td align="center">电话号码</td>
	</tr>
<%
	String id=request.getParameter("id");
	String name=request.getParameter("name");
	String idcard=request.getParameter("idcard");
	String department=request.getParameter("department");
	String phone=request.getParameter("phone");
	TeacherDao td=new TeacherDao();
	List<Teacher1> listInsert=td.insertTeacher(id, name, idcard, department, phone);
	HttpSession session1=request.getSession();
	session1.setAttribute("listInsert", listInsert);
	List<Teacher1> list=(List<Teacher1>)session.getAttribute("listInsert");
		for(int i=0;i<list.size();i++){
			Teacher1 t=list.get(i);	
 %>
 	<tr>
 		<td align="center"><%=id %></td>
 		<td align="center"><%=name %></td>
 		<td align="center"><%=idcard %></td>
 		<td align="center"><%=department %></td>
 		<td align="center"><%=phone %></td>
 	</tr>
 <%} %>
 </table>
</body>
</html>